package me.yushuai.wukong.base.convertor;

import me.yushuai.wukong.base.api.dto.CreateLocationDTO;
import me.yushuai.wukong.base.api.dto.LocDTO;
import me.yushuai.wukong.base.api.dto.UpdateLocationDTO;
import me.yushuai.wukong.base.entity.Location;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

import java.util.List;

/**
 * @author zhoushuai@189.cn
 * @since 2022-11-21
 */
@Mapper(componentModel = "spring")
public interface LocationConvertor {

    Location mapToLocation(CreateLocationDTO dto);

    void updateToLocation(UpdateLocationDTO dto, @MappingTarget Location location);

    LocDTO mapToLocationDto(Location location);

    List<LocDTO> mapToLocationDtoList(List<Location> list);


}
